package com.esri.core.internal.map;

import com.esri.core.internal.util.d;
import com.esri.core.map.DrawingInfo;
import com.esri.core.map.FeatureTemplate;
import com.esri.core.map.Field;
import com.esri.core.map.LayerSource;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class a {
    private String a;
    private String b;
    private DrawingInfo c;
    private ArrayList<Field> d;
    private boolean e;
    private double f;
    private double g;
    private String h;
    private String i;
    private List<FeatureTemplate> j;
    private String k;
    private String l;
    private LayerSource m;
    private String n;
    private String o;

    public String a() {
        return this.b;
    }

    public DrawingInfo b() {
        return this.c;
    }

    public ArrayList<Field> c() {
        return this.d;
    }

    public boolean d() {
        return this.e;
    }

    public String e() {
        return this.h;
    }

    public List<FeatureTemplate> f() {
        return this.j;
    }

    public String g() {
        return this.k;
    }

    public String h() {
        return this.l;
    }

    public String i() {
        return this.n;
    }

    public String j() {
        return this.o;
    }

    public String k() {
        return this.a;
    }

    public LayerSource l() {
        return this.m;
    }

    public double m() {
        return this.g;
    }

    public double n() {
        return this.f;
    }

    public String o() {
        return this.i;
    }

    public static a a(JsonParser jsonParser) throws Exception {
        if (d.c(jsonParser)) {
            a aVar = new a();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if ("definitionExpression".equals(currentName)) {
                    aVar.a = jsonParser.getText();
                } else if ("id".equals(currentName)) {
                    aVar.n = jsonParser.getText();
                } else if ("hasAttachments".equals(currentName)) {
                    aVar.e = jsonParser.getBooleanValue();
                } else if ("drawingInfo".equals(currentName)) {
                    aVar.c = DrawingInfo.fromJson(jsonParser);
                } else if ("fields".equals(currentName)) {
                    aVar.d = new ArrayList<>();
                    if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                            aVar.d.add(Field.fromJson(jsonParser));
                        }
                    }
                } else if ("type".equals(currentName)) {
                    aVar.o = jsonParser.getText();
                } else if ("templates".equals(currentName)) {
                    if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                        aVar.j = new ArrayList();
                        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                            aVar.j.add(FeatureTemplate.fromJson(jsonParser));
                        }
                    }
                } else if ("source".equals(currentName)) {
                    aVar.m = LayerSource.fromJson(jsonParser);
                } else if ("minScale".equals(currentName)) {
                    aVar.g = jsonParser.getDoubleValue();
                } else if ("maxScale".equals(currentName)) {
                    aVar.f = jsonParser.getDoubleValue();
                } else if ("hasAttachments".equals(currentName)) {
                    aVar.e = jsonParser.getBooleanValue();
                } else if ("objectIdField".equals(currentName)) {
                    aVar.i = jsonParser.getText();
                } else {
                    jsonParser.skipChildren();
                }
            }
            return aVar;
        }
        return null;
    }

    public String toString() {
        return "LayerDefinition [mDefinitionExpression=" + this.a + ", mMaxScale=" + this.f + ", mMinScale=" + this.g + ", mName=" + this.h + ", mSource=" + this.m.getType() + "]";
    }
}
